<template>
  <div class="w-full h-full flex flex-col">
    <div class="w-full flex h-10 items-center text-[--textColor] border-b mb-3">
      <span class="ml-5">PDF预览</span>
    </div>
    <div class="w-full flex-1 px-5 pb-5 box-border overflow-y-auto">
      <pdf-viwe :source="source" :downloadShow='true'></pdf-viwe>
    </div>
  </div>
</template>

<script lang="ts">
import { defineComponent, onMounted, ref, watch } from "vue";
import pdfJdk from "@/components/pdfJdk/index.vue";
import {_getPdfPreview} from '@/api/const/index'

export default defineComponent({
  components: {
    "pdf-viwe": pdfJdk,
  },
  setup() {
    const source=ref();
    const getPdfPreview=async()=>{
        const res:any=await _getPdfPreview('1692356601076953090')
        console.log(res);
        source.value=res
    }
    onMounted(()=>{
        getPdfPreview()
    })
    return {
      source,
    };
  },
});
</script>

<style scoped></style>
